<?php
define('DS',DIRECTORY_SEPARATOR);
//系统根目录
define('ROOT',dirname(dirname(__FILE__)));
require_once(ROOT. DS.'config'.DS.'eloquent.php');

//定义JOB
$APP_CONFIG = [
	'task_jobs'=>[
		['id'=>1,'class'=>'class1','cron'=>'*/1 * * * *'],
		['id'=>2,'class'=>'class2','cron'=>'*/2 * * * *']
	]
];

//检查、并执行的job
foreach($APP_CONFIG['task_jobs'] as $job){
	$cron = \Cron\CronExpression::factory($job['cron']);
	if($cron->isDue()){
		//执行任务
		var_dump($job);
	}
}





